package edu.hawaii.nearestneighbor.util;

import java.util.List;

/**
 * Container class for parameters.
 * @author Robertpuckett
 *
 */
public class Parameters {
  /**
   * Cam parameter a. 
   */
  public double a;
  /**
   * Cam parameter b.
   */
  public double b;
  /**
   * Cam direction parameter tau.
   */
  public List<Double> t;

  /**
   * Constructs an instance of parameters.
   * @param a parameter a.
   * @param b parameter b.
   * @param t parameter tau representing direction vector.
   */
  public Parameters(double a, double b, List<Double> t) {
    this.a = a;
    this.b = b;
    this.t = t;
  }

  /**
   * Converts a set of parameters to a string.
   * @return string representation of the parameters.
   * @see java.lang.Object#toString()
   */
  public String toString() {
    String output = "(" + this.a + ", " + this.b + ", [";
    boolean first = true;
    for (int i = 0; i < this.t.size(); i++) {
      if (first) {
        first = false;
      }
      else {
        output = output + ", ";
      }
      output = output + t.get(i);
    }
    output = output + "])";
    return output;
  }
}